package samsung.sds.survey.surveyVote.service;

import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;

import samsung.sds.survey.surveyVote.model.QuestionEntity;
import samsung.sds.survey.surveyVote.model.SurveyResultEntity;
import samsung.sds.system.common.baseQuery.BaseServiceInterface;
import samsung.sds.system.common.model.QueryParam;

/**
 * 
 * 继承基类接口，定义除基类之外需要向外部使用的接口方法
 * 
 * @author lixin.qiu
 * @createDate 2016-01-18
 */
public interface VoteSurveyResultService extends
		BaseServiceInterface<SurveyResultEntity> {

	/**
	 * 迭代插入提交的问题的答案
	 * 
	 * @param keSet
	 * @return
	 * @throws UnsupportedEncodingException
	 */
	int iteratorInsertSurveyResult(Set<Entry<String, String>> keSet)
			throws UnsupportedEncodingException;

	/**
	 * 迭代更新提交的问题的答案
	 * 
	 * @param keSet
	 * @return
	 * @throws UnsupportedEncodingException
	 */
	int iteratorUpdateSurveyResult(Set<Entry<String, String>> keSet)
			throws UnsupportedEncodingException;

	/**
	 * @param surveyId
	 * @return List<Question> 根据surveyId查询调查问卷的问题,问题选项及答案
	 */
	List<QuestionEntity> queryQuestionAndSurveyResultList(QueryParam param, Boolean isPreview);

}
